package com.ingsing.user.service.impl;

import com.ingsing.user.common.utils.FileUploadUtils;
import com.ingsing.user.service.IFileUploadService;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.io.IOException;


/**
 * @author: NALHOUG
 * @time: 2019/10/31 15:31
 * @explain:
 */
@Service
public class FileUploadServiceImpl implements IFileUploadService {
    @Resource
    FileUploadUtils fileUploadUtils;

    @Override
    public String uploadImage(MultipartFile multipartFile) throws IOException {
        String imageFile = fileUploadUtils.saveImageFile(multipartFile);
        return imageFile;
    }
}
